package com.syh.jn.scm.service.api.supplier.finance.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

public interface OrderExpensesBillEnums {

  /**
   * 订单类型
   */
  @AllArgsConstructor
  @Getter
  public enum OrderType {
    SALE_ORDER(Short.valueOf("1"), "销售单", "单据类型"),
    PURCHASE_ORDER(Short.valueOf("2"), "采购单", "单据类型");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static OrderType valueOf(Short status) {
      switch (status) {
        case 1:
          return SALE_ORDER;
        case 2:
          return PURCHASE_ORDER;
      }
      return null;
    }
  }

  /**
   * 订单状态
   */
  @AllArgsConstructor
  @Getter
  public enum State {
    UN_CONFIRM(Short.valueOf("0"), "未确认", "订单状态"),
    CONFIRM(Short.valueOf("1"), "已确认", "订单状态");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static State valueOf(Short status) {
      switch (status) {
        case 1:
          return UN_CONFIRM;
        case 2:
          return CONFIRM;
      }
      return null;
    }
  }

  /**
   * 费用承担方
   */
  @AllArgsConstructor
  @Getter
  public enum ExpenseResponsible {
    OUR_RESPONSIBLE(Short.valueOf("0"), "我方承担", "费用承担方"),
    CUSTOMER_RESPONSIBLE(Short.valueOf("1"), "客户承担", "费用承担方");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static ExpenseResponsible valueOf(Short status) {
      switch (status) {
        case 1:
          return OUR_RESPONSIBLE;
        case 2:
          return CUSTOMER_RESPONSIBLE;
      }
      return null;
    }
  }

  /**
   * 是否纳入总额
   */
  @AllArgsConstructor
  @Getter
  public enum IncludeTotalAmount {
    UN_INCLUDE(Short.valueOf("0"), "不纳入总额", "是否纳入总额"),
    INCLUDE(Short.valueOf("1"), "纳入总额", "是否纳入总额");

    private Short status;
    private String statusName;
    private String statusBelong;

    @Override
    public String toString() {
      return this.status.toString();
    }

    public static IncludeTotalAmount valueOf(Short status) {
      switch (status) {
        case 0:
          return UN_INCLUDE;
        case 1:
          return INCLUDE;
      }
      return null;
    }
  }
}
